home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
MATHEMAT
/
2632.ZIP
/
MERCURYZ.EXE
/
LADDERS.EKA
< prev
next >
Wrap
Text File
|
1992-03-24
|
899b
|
31 lines
; This demonstrates solving a system of nonlinear equations,
; and initializing the iterative solver.
; The equations are from a geometrical problems involving ladders.
; Problem: You have two ladders, one 35 feet long, the other 45 feet
; long. You need to arrange them in an alley between two skyscrapers
; so that they cross 10 feet above the ground. How wide should the
; alley be?
; Let:
; x = width of the alley
; a = height of the 45-foot ladder
; b = height of the 35-foot ladder
; P = point on ground below where ladders cross
; y = distance along the ground between P and 35-foot ladder
; z = distance along the ground between P and 45-foot ladder
{ These are the equations.}
x^2 + a^2 = 45^2
x^2 + b^2 = 35^2
y / 10 = x / b
z / 10 = x / a
y + z = x
{ These are the initializations.}
x := 20
y := 20
a := 20
b := 20
z := 20